using UnityEngine;
using System.Collections;

public class LifeManager : MonoBehaviour {
	public int lives = 3;

	// Use this for initialization
	void Start () {
	
	}
	
	// Update is called once per frame
	void Update () {
		if(this.lives <= 0) {
			this.gameObject.SendMessage ("OnDeath", SendMessageOptions.DontRequireReceiver);
		}
	}
	
	public void TakeHit() {
		this.lives--;
	}
}
